package com.matrix.draft.algorithm;

public class AlgorithmMain {

    // 弹跳球
    // public static void main(String[] args) {
    //     float starHeight = 100.0f;
    //     float sumHeight = 0.0f;
    //     for (int i = 0; i < 10; i++) {
    //         sumHeight += starHeight;
    //         starHeight /= 2;
    //     }
    //     System.out.printf("第10次落地时总共经过%.2f米\n第10次反弹%.2f米", sumHeight, starHeight);
    // }

    // 水仙花数
    public static void main(String[] args) {
        for (int i = 100; i < 1000; i++) {
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100;
            if (Math.pow(ge, 3) + Math.pow(shi, 3) + Math.pow(bai, 3) == i) {
                System.out.print(i + " ");
            }
        }

    }

}
